Repository navigation
Conversation
…ls (EMSR-2643) The flag cleanup skill treated a flag that is OFF in every critical environment as safe to remove, and hardcoded its offVariation. The LaunchDarkly Ready for cleanup view does not: a flag is ready for code removal only when it is launched in every critical environment, and launched requires targeting to be ON (gonfalon internal/flags/flag_staleness.go getStaleFlagDataWithLifecycleSettings, internal/flags/models/feature_flag.go FullyRolledOutVariation). - launchdarkly-flag-cleanup 1.1.0-experimental: state the product rule, stop on off-everywhere flags, and continue only on explicit user confirmation that the other variations' code is abandoned. - launchdarkly-flag-discovery 1.1.0-experimental: split "ready for code removal" from "ready to archive", and stop telling users to turn a flag off before removal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
…ness (EMSR-2643) check-removal-readiness now reads LaunchDarkly's code removal verdict (flag-archive-checks) and returns it in details.lifecycle. A flag that is not ready for code removal is "blocked" with a not_ready_for_code_removal blocker, and the verdict is "caution" with code_removal_readiness_unavailable when the tool cannot read it. The skills said "safe" means proceed and "caution" means let the user decide, which an agent can read as permission to delete code. - launchdarkly-flag-cleanup 1.2.0-experimental: on "blocked" with details.lifecycle.readyToArchive true, suggest archive-flag and do not remove code; treat "caution" as needing user confirmation; name the environments that are not launched. - launchdarkly-flag-discovery 1.2.0-experimental: the same rules in the verdict list and the removal readiness checklist. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
…p (EMSR-2643) check-removal-readiness now reports details.lifecycle.codeAlreadyRemoved for a flag that is launched in every critical environment and has no code references left. Gonfalon does not mark that flag ready for code removal, because it needs code references. The cleanup and discovery skills now suggest archiving it. Set both skills to 1.1.0-experimental: this branch is one release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
Skill eval results
Only suites whose source actually changed since their last recorded score were re-run. Soft-failing while we stabilise the baseline. |
…g cleanup skills (EMSR-2643) The flag cleanup and discovery skills named the gram-functions tools (check-removal-readiness, get-flag, list-flags, find-stale-flags, get-code-references). gram-functions is being retired. The skills now use the hosted LaunchDarkly MCP names: get-removal-readiness, get-flags, search-stale-flags and get-flag-code-references. The get-flags state filter now lists the hosted values (live, deprecated, archived). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
…roject's cleanup verdict (EMSR-2643) The cleanup skill offered archive-flag when readyToArchive was true even if the repository still referenced the flag. An archived flag is absent, so that code gets its fallback value. The skill now offers archival only when Step 1 found no references. For codeAlreadyRemoved, which the MCP tool now returns as caution, it offers archival only after the user confirms that the cleanup is deployed everywhere. The skill told agents to confirm evaluation recency and launched status with get-flags, which returns only targeting. It also applied the default lifecycle checks again on top of readyForCodeRemoval. The skill now follows readyForCodeRemoval. When the lifecycle verdict is missing or unavailable, it stops and asks the user to check the Ready for cleanup view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
…es reach code removal (EMSR-2643) When codeAlreadyRemoved was true and Step 1 found local references, the skill said to continue, and then stopped on readyForCodeRemoval false. That value is false only because LaunchDarkly does not scan the repository. The stop now has an exception for this case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
…oval (EMSR-2643) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
…movalState pass-through (EMSR-2643) blocked now means only not_ready_for_code_removal, with its reasons in details.lifecycle.codeRemovalBlockers. codeAlreadyRemoved also covers ignoreEvalsForCodeRemoval projects and repositories LaunchDarkly does not scan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9b59765. Configure here.
…chiving a codeAlreadyRemoved flag (EMSR-2643) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-by: termag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
The flag cleanup and flag discovery skills treated a flag that is OFF in every critical environment as ready to remove, and they told agents to hardcode its
offVariation. A flag that is off everywhere often guards a feature that was never released, so the cleanup deletes that feature. LaunchDarkly's Ready for cleanup view does not list this flag: a flag is ready for code removal only when it is launched (ON, serving one variation, evaluated and unchanged recently) in every critical environment.Fix
details.lifecycleverdict from the removal readiness tool:blockedwithnot_ready_for_code_removal: do not remove code, and name the environments that are notlaunched.readyToArchive: true: suggest archiving the flag, not code removal.codeAlreadyRemoved: true: the flag is launched everywhere and has no code references left, so suggest archiving it.cautionis no longer permission to remove code. Forcode_removal_readiness_unavailable, the user must confirm in LaunchDarkly that the flag is launched.1.1.0-experimental.Testing
python3 scripts/validate_skills.pypasses (54 skills).python3 scripts/generate_catalog.pymakes no change toskills.json.pytest tests/*.pypasses.Related
get-removal-readiness: https://github.com/launchdarkly/mcp/pull/448get-removal-readiness. This branch merged main in 49b301c and keeps those names.details.lifecycle. This PR can merge in any order. Before it deploys,details.lifecycleis missing, and the skills still apply the Ready for cleanup rule withget-flags. After this PR merges,launchdarkly/mcpneeds askilldata.pinbump andtask sync:skillsto ship these skills.🤖 Generated with Claude Code
Opened from termag
Note
Overview
Aligns the flag cleanup and discovery skills with LaunchDarkly’s Ready for cleanup rule and the new
details.lifecyclepayload fromget-removal-readiness. Both skills bump to1.1.0-experimentalinskills.jsonand each skill’smarketplace.json.Cleanup skill now treats LaunchDarkly’s lifecycle verdict as authoritative:
blockedonly fornot_ready_for_code_removal(with reasons and non‑launchedenvironments),cautionnever authorizes code removal without explicit user confirmation (includingcode_removal_readiness_unavailableandcode_already_removed), andreadyToArchivesteers towardarchive-flaginstead of removing code. It adds the full Ready for cleanup checklist (temporary, age, no prerequisites,launchedin every critical environment with recent evaluation and stable targeting, plus code references) and stops assumingoffVariationwhen every environment is OFF unless the user explicitly confirms abandoning other variations; the PR template gains a matching warning.Discovery skill and
flag-health-signals.md/removal-readiness-checklist.mdsplit ready for code removal vs ready to archive, mark OFF everywhere and never requested as not ready for removal, tighten cross‑environment and permanent‑flag rules, and document the sameget-removal-readinesslifecycle interpretations (including search this repo before archiving whencode_already_removed).CHANGELOG records the behavior change;
tests/test_flag_health_signals.pyadds tests that key decision matrix rows andcode_already_removedguidance stay consistent with the docs.Reviewed by Cursor Bugbot for commit 9475a1f. Bugbot is set up for automated code reviews on this repo. Configure here.
Related Jira issue: EMSR-2643: [Claude] Flag cleanup skill treats flags that are off everywhere as ready for removal; the UI's Ready for cleanup view does not